package com.jdd.modules.device.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jdd.modules.device.entity.TDevice;

import java.util.List;

/**
 * <p>
 * 设备表 服务类
 * </p>
 *
 * @author zly
 * @since 2022-03-24
 */
public interface TDeviceService extends IService<TDevice> {
    /**
     * 查找所有设备
     *
     * @param page            分页
     * @param device          实体
     * @param projectCodeList 数字权限集合
     * @return com.baomidou.mybatisplus.core.metadata.IPage<com.jdd.modules.device.entity.TDevice>
     * @throws
     * @author zxl
     * @date 2022/10/27 14:23
     */
    IPage<TDevice> findAllDevice(Page<TDevice> page, TDevice device, List<String> projectCodeList);

    /**
     * 开门指令发送
     *
     * @param deviceSn 需要发送的设备的sn
     * @return void
     * @throws
     * @author zxl
     * @date 2022/10/27 14:23
     */
    void openDoor(String deviceSn);

    /*更改设备别名*/
    void updateDeviceAlias(String deviceParentCode,Integer type,String typeParentCode,String name);

}
